#include "radar.h"

bool Radar::detect(){
	bool detected = false;

	for(int i=loc.getYlocation()-radius; i <= loc.getYlocation() + radius; ++i){
		for(int j=loc.getXlocation()-radius; j <= loc.getXlocation() + radius; ++j){
			if(!detected){
				detected = world->isObjectAtLocation(loc.getYlocation(),loc.getXlocation());
			}
		}
	}

	return detected;
}


